﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Site.Mobile
{
    public partial class Hives : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Redirect("AddHive.aspx");
        }

        protected void GridView_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {

        }

        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Edit")
            {
                int iIndex = Convert.ToInt32(e.CommandArgument);
                DataView View = (DataView)SqlDataSource1.Select(new DataSourceSelectArguments());
                string HID = View[iIndex]["Hive_ID"].ToString();
                Response.Redirect("EditHive.aspx?HID=" + HID);
            }
        }
    }
}